package com.naiterui.ehp.bs.cms.modules.user.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.naiterui.ehp.bs.cms.common.constants.DsName;
import com.naiterui.ehp.bs.cms.modules.user.entity.Pharmacist;
import com.naiterui.ehp.bs.cms.modules.user.vo.PharmacistDetailVO;
import com.naiterui.ehp.bs.cms.modules.user.vo.PharmacistVO;
import com.naiterui.ehp.bs.cms.modules.user.vo.SelectPharmacistVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@DS(DsName.EHP)
public interface PharmacistMapper extends BaseMapper<Pharmacist> {

    List<SelectPharmacistVO> getAllSelect();

    SelectPharmacistVO getPharmacist(Long id);

    SelectPharmacistVO getByPhone(String phone);

    Page<PharmacistVO> getPage(@Param("page") IPage<PharmacistVO> page, @Param("ew") Wrapper<PharmacistVO> entityWrapper);

    /**
     * 根据药师id获取签名证书序列号
     * @param pharmacistId
     * @return
     */
    String getSealCertNumberByPharmacistId(Long pharmacistId);

    /**
     * 获取药师详情
     * @param pharmacistId
     * @return
     */
    PharmacistDetailVO getById(Long pharmacistId);

}
